package com.qiwx.pigeon.data.db;


import org.litepal.LitePal;
import org.litepal.annotation.Column;
import org.litepal.crud.LitePalSupport;

import java.util.ArrayList;
import java.util.List;

/**
 * @description
 * @Author qiwx
 * @Date 2020-03-24 13:39
 * 鸽笼表
 **/
public class CageModel extends LitePalSupport {
    @Column(unique = true)
    private int id;
    private int wh_id;//鸽仓Id
    private int number;//鸽笼编号
    private String name;
    private List<PigeonModel> pigeos = new ArrayList<>();//鸽子
    private int status;//1  存栏状态 0是空笼
    private boolean is_adjust;//是否需要调窝
    long create_date;//创建时间 ,鸽笼创建蛋时候记录的时间
    long update_date;//更新时间 ,每次重新设置空笼的时间
    private long lay_egg_date;//下蛋日期
    private long last_lay_egg_date;//上一次下蛋日期
    private long kw_date;//记录空窝时间

    public long getKw_date() {
        return kw_date;
    }

    public void setKw_date(long kw_date) {
        this.kw_date = kw_date;
    }

    public int getIs_remind() {
        return is_remind;
    }

    public long getLast_lay_egg_date() {
        return last_lay_egg_date;
    }

    public void setLast_lay_egg_date(long last_lay_egg_date) {
        this.last_lay_egg_date = last_lay_egg_date;
    }

    public long getUpdate_date() {
        return update_date;
    }

    public void setUpdate_date(long update_date) {
        this.update_date = update_date;
    }


    public long getLay_egg_date() {
        return lay_egg_date;
    }

    public void setLay_egg_date(long lay_egg_date) {
        this.lay_egg_date = lay_egg_date;
    }

    /**
     * 0 空窝
     * 1 有蛋
     * 2 查蛋
     * 3 孵蛋
     * 4 查仔
     * 5 二次查仔
     * 6 出壳
     * 只有在生产状态大于2时候才可以查仔
     */
    private int produceStatus;// 生产状态
    private int is_remind;//是否提醒 默认是0 提醒状态

    public int getProduceStatus() {
        return produceStatus;
    }

    public void setProduceStatus(int produceStatus) {
        this.produceStatus = produceStatus;
    }

    public int isIs_remind() {
        return is_remind;
    }

    public void setIs_remind(int is_remind) {
        this.is_remind = is_remind;
    }

    public long getCreate_date() {
        return create_date;
    }

    public void setCreate_date(long create_date) {
        this.create_date = create_date;
    }

    public boolean isIs_adjust() {
        return is_adjust;
    }

    public void setIs_adjust(boolean is_adjust) {
        this.is_adjust = is_adjust;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getWh_id() {
        return wh_id;
    }

    public void setWh_id(int wh_id) {
        this.wh_id = wh_id;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<PigeonModel> getPigeos() {
        return LitePal.where("c_id=?", String.valueOf(id)).find(PigeonModel.class);
    }

    public void setPigeos(List<PigeonModel> pigeos) {
        this.pigeos = pigeos;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }
}
